package com.lcredu.homework.dao;

import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Repository;

import javax.annotation.Resource;

/**
 * @author 黎长容
 * @date 2025-07-17 23:54
 */
@Repository
public class TaoBaoDao {
    @Resource
    private JdbcTemplate jdbcTemplate;

    //淘宝获取抽成
    public void updatePrice(Integer taoBaoId, Double money) {
        String sql = "update taobao set price = price + ? where id = ?";
        jdbcTemplate.update(sql, money, taoBaoId);
    }
}
